<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
function whenSubmit(obj) {
	if ($("#title").val() == "") {
		alert('일정의 제목을 입력해주세요.');
		return false;
	} 
	else if ($("#location").val() == "") {
		alert('장소를 입력해주세요.');
		return false;
	} 
	else if ($("#description").val() == "") {
		alert('설명을 입력해주세요.');
		return false;
	}
	else if ($("#initiatorAlias").val() == "") {
		alert('이름을 입력해주세요.');
		return false;
	} 
	else if ($("#initiatorEmail").val() == "") {
		alert('이메일을 입력해주세요.');
		return false;
	} 
	else { 
		return true;
	}
}
</script>
</head>
<body>
	<form class="form-container" action="create_step2.jsp" method="post" onsubmit='return whenSubmit(this);'>
		<div class="form-contain">
			<div class="process">
				<ol class="inline">
					<li><a href="/Finple/data/create_step1.jsp"><span class="text-success">일정 정보 입력하기</span></a></li>
					<li>▶</li>
					<li><a href="#">시간 제안하기</a></li>
					<li>▶</li>
					<li><a href="#">설정하기</a></li>
					<li>▶</li>
					<li><a href="#">초대하기</a></li>
				</ol>
			</div>
			<div id="header">
				<div id="pageTitle">
					<h2 align="center">
						<font color="#8B5927">일정 정보 입력하기</font>
					</h2>
				</div>
			</div>
			<div>
				<img src="/Finple/image/calander.PNG" />
			</div>
			<div class="form-title">
				<b><font color="#8B5927">제목</font></b>
			</div>
			<p>
				<input class="form-field" type="text" id="title" name="title" placeholder="일정 이름" />
			</p>
			<p id="titleError" class="error" style="display: none;">값을 입력해주세요</p>
			<div class="form-title">
				<b><font color="#8B5927">장소(선택)</font></b>
			</div>
			<p>
				<input class="form-field" type="text" id="location" name="location" placeholder="예) 서울역 광장" />
			</p>
			<div class="form-title">
				<b><font color="#8B5927">설명(선택)</font></b>
			</div>
			<div>
				<textarea id="description" name="description" rows="10" class="form-field" placeholder=""></textarea>
				<span id="countInfos" class="smallText"></span>
			</div>
			<p id="descriptionError" class="error" style="display: none;">입력한 값이 512자 이상입니다.</p>
			<div class="form-title">
				<b><font color="#8B5927">이름</font></b>
			</div>
			<p>
				<input class="form-field" type="text" id="initiatorAlias" name="initiatorAlias" placeholder="이름" /><br />
			</p>
			<p id="initiatorAliasError" class="error" style="display: none;">값을 입력해주세요</p>
			<div id="emailInputDiv" class="form-title">
				<div class="form-title">
					<b><font color="#8B5927">E-mail</font></b>
				</div>
				<p>
					<input class="form-field" type="text" id="initiatorEmail" name="initiatorEmail" placeholder="address@email.com" /> <br />이 주소로 투표결과에 대한 메일을 받게 됩니다.
				</p>
				<p id="initiatorEmailError" class="error" style="display: none;"></p>
				<p id="initiatorEmailWarning" class="error warning" style="display: none;"></p>
			</div>
			<div class="submit-container">
				<p class="error otherError" style="display: none;"></p>
				<input type="hidden" name="name" value="2" />
				<button type="button" class="btn btn-success">Back</button>
				<button type="submit" class="btn btn-success">Next step</button>
			</div>
		</div>
	</form>
</body>
</html>